<template>
  <el-dialog width="60%" top="10vh" :title="detail.title" append-to-body :visible.sync="popupVisible" :before-close="close">
    <!-- table start -->
    <el-row>
      <el-col :span="24">
         <el-table
          ref="table"
          :data="detail.data"
          stripe
          height="500"
          empty-text
          fit
          tooltip-effect="dark">
          <el-table-column align="center" type="index" :label="$t('m.index')" width="50px"></el-table-column>
          <el-table-column align="center" v-for="(item,index) in detail.thead" :prop="item.prop" :label="item.name" :key="index"></el-table-column>
        </el-table>
      </el-col>
    </el-row>
    <!-- table end -->
    <el-row>
      <el-col :span="24" align="center">
        <el-button @click="close">{{$t('m.close')}}</el-button>
      </el-col>
    </el-row>
  </el-dialog>
</template>
<script>
export default {
  name:'stock-info-popup',
  props:['popupVisible','detail'],
  data(){
    return {

    }
  },
  methods:{
    close(){
      this.$emit('close')
    }
  }
}
</script>